//
//  LoginOrRegistVC.m
//  WYModel
//
//  Created by ios on 2017/3/2.
//  Copyright © 2017年 Wy. All rights reserved.
//

#import "LoginOrRegistVC.h"
#import "WYStarView.h"
#import "WYSearchBar.h"

@interface LoginOrRegistVC ()


@end

@implementation LoginOrRegistVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    WYStarView *starView = [[WYStarView alloc] initWithFrame:CGRectMake(20, 80, 100, 30) starSize:CGSizeMake(20, 20) withStyle:WYStarTypeFloat];
    starView.star = 4.4;
    starView.isTouch = YES;
    
    starView.starBlock = ^(NSString *starFloat){
    
        WYLog(@"%@",starFloat);
    };
    
    [self.view addSubview:starView];
    
    UIView *orangeView = [[UIView alloc] initWithFrame:CGRectMake(100, 200, 100, 0)];
    
    orangeView.backgroundColor = [UIColor orangeColor];
    [self.view addSubview:orangeView];
    
    [UIView animateWithDuration:1.2 delay:0.1 usingSpringWithDamping:0.5 initialSpringVelocity:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
        orangeView.frame = CGRectMake(100, 200, 100, 200);
        
    } completion:^(BOOL finished) {
        
    }];
    
}

-(void)resetNav{
    //创建返回按钮， 改变登陆状态
    UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [leftBtn setBackgroundImage:[UIImage imageNamed:@"backbutton_icon3"] forState:UIControlStateNormal];
    leftBtn.frame = CGRectMake(0, 0, 30, 30);
    [leftBtn addTarget:self action:@selector(disMissBtnClick) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:leftBtn];
}


-(void)disMissBtnClick{
    [self dismissViewControllerAnimated:YES completion:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
